import request from '@/utils/request';

/**
 * 是否系统内置
 * @returns
 */
export const fetchIsSystemInner = () => {
  return request({
    url: 'system/dict/data/type/sys_yes_no',
  });
};

/**
 * 状态
 */
export const fetchCommonStatusDict = () => {
  return request({
    url: 'system/dict/data/type/sys_common_status',
  });
};

/**
 * 操作类型
 */
export const fetchOperationDict = () => {
  return request({
    url: 'system/dict/data/type/sys_oper_type',
  });
};

/**
 * 字典查询
 */
export const fetchDictOfType = (dictType: string) => {
  return request({
    url: `system/dict/data/type/${dictType}`,
  });
};

export const fetchDictsOfType = (dictTypes: string[]) =>
  request({ url: `system/dict/data/types/${dictTypes.join()}` });
